package DesignMode.flyweight;

/**
 * @author : zhouliangliang5
 * @date : 2023/2/17 10:01
 * @description : 五子棋
 */
public class Gobang implements Chess{

    private String color;
    private int x;
    private int y;

    public Gobang(String color) {
        this.color = color;
    }

    @Override
    public void move() {
        this.x = x;
        this.y = y;
        System.out.println(color + " chess move to x : " + x + " , y: " + y);
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }
}
